3.844 \(\int \sqrt{\cos (c+d x)} \sqrt{b \cos (c+d x)} (A+B \cos (c+d x)) \, dx\)

Optimal. Leaf size=98 \[ \frac{A \sin (c+d x) \sqrt{b \cos (c+d x)}}{d \sqrt{\cos (c+d x)}}+\frac{B x \sqrt{b \cos (c+d x)}}{2 \sqrt{\cos (c+d x)}}+\frac{B \sin (c+d x) \sqrt{\cos (c+d x)} \sqrt{b \cos (c+d x)}}{2 d} \]

[Out]

(B*x*Sqrt[b*Cos[c + d*x]])/(2*Sqrt[Cos[c + d*x]]) + (A*Sqrt[b*Cos[c + d*x]]*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]
]) + (B*Sqrt[Cos[c + d*x]]*Sqrt[b*Cos[c + d*x]]*Sin[c + d*x])/(2*d)

________________________________________________________________________________________

Rubi [A]  time = 0.0222809, antiderivative size = 98, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 33, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.061, Rules used = {17, 2734} \[ \frac{A \sin (c+d x) \sqrt{b \cos (c+d x)}}{d \sqrt{\cos (c+d x)}}+\frac{B x \sqrt{b \cos (c+d x)}}{2 \sqrt{\cos (c+d x)}}+\frac{B \sin (c+d x) \sqrt{\cos (c+d x)} \sqrt{b \cos (c+d x)}}{2 d} \]

Antiderivative was successfully verified.

[In]

Int[Sqrt[Cos[c + d*x]]*Sqrt[b*Cos[c + d*x]]*(A + B*Cos[c + d*x]),x]

[Out]

(B*x*Sqrt[b*Cos[c + d*x]])/(2*Sqrt[Cos[c + d*x]]) + (A*Sqrt[b*Cos[c + d*x]]*Sin[c + d*x])/(d*Sqrt[Cos[c + d*x]
]) + (B*Sqrt[Cos[c + d*x]]*Sqrt[b*Cos[c + d*x]]*Sin[c + d*x])/(2*d)

Rule 17

Int[(u_.)*((a_.)*(v_))^(m_)*((b_.)*(v_))^(n_), x_Symbol] :> Dist[(a^(m + 1/2)*b^(n - 1/2)*Sqrt[b*v])/Sqrt[a*v]
, Int[u*v^(m + n), x], x] /; FreeQ[{a, b, m}, x] &&  !IntegerQ[m] && IGtQ[n + 1/2, 0] && IntegerQ[m + n]

Rule 2734

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[((2*a*c
+ b*d)*x)/2, x] + (-Simp[((b*c + a*d)*Cos[e + f*x])/f, x] - Simp[(b*d*Cos[e + f*x]*Sin[e + f*x])/(2*f), x]) /;
 FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]

Rubi steps

\begin{align*} \int \sqrt{\cos (c+d x)} \sqrt{b \cos (c+d x)} (A+B \cos (c+d x)) \, dx &=\frac{\sqrt{b \cos (c+d x)} \int \cos (c+d x) (A+B \cos (c+d x)) \, dx}{\sqrt{\cos (c+d x)}}\\ &=\frac{B x \sqrt{b \cos (c+d x)}}{2 \sqrt{\cos (c+d x)}}+\frac{A \sqrt{b \cos (c+d x)} \sin (c+d x)}{d \sqrt{\cos (c+d x)}}+\frac{B \sqrt{\cos (c+d x)} \sqrt{b \cos (c+d x)} \sin (c+d x)}{2 d}\\ \end{align*}

Mathematica [A]  time = 0.111821, size = 57, normalized size = 0.58 \[ \frac{\sqrt{b \cos (c+d x)} (4 A \sin (c+d x)+B (2 (c+d x)+\sin (2 (c+d x))))}{4 d \sqrt{\cos (c+d x)}} \]

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[Cos[c + d*x]]*Sqrt[b*Cos[c + d*x]]*(A + B*Cos[c + d*x]),x]

[Out]

(Sqrt[b*Cos[c + d*x]]*(4*A*Sin[c + d*x] + B*(2*(c + d*x) + Sin[2*(c + d*x)])))/(4*d*Sqrt[Cos[c + d*x]])

________________________________________________________________________________________

Maple [A]  time = 0.439, size = 55, normalized size = 0.6 \begin{align*}{\frac{B\sin \left ( dx+c \right ) \cos \left ( dx+c \right ) +2\,A\sin \left ( dx+c \right ) +B \left ( dx+c \right ) }{2\,d}\sqrt{b\cos \left ( dx+c \right ) }{\frac{1}{\sqrt{\cos \left ( dx+c \right ) }}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^(1/2)*(b*cos(d*x+c))^(1/2)*(A+B*cos(d*x+c)),x)

[Out]

1/2/d*(b*cos(d*x+c))^(1/2)*(B*sin(d*x+c)*cos(d*x+c)+2*A*sin(d*x+c)+B*(d*x+c))/cos(d*x+c)^(1/2)

________________________________________________________________________________________

Maxima [A]  time = 2.14998, size = 54, normalized size = 0.55 \begin{align*} \frac{{\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} B \sqrt{b} + 4 \, A \sqrt{b} \sin \left (d x + c\right )}{4 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^(1/2)*(b*cos(d*x+c))^(1/2)*(A+B*cos(d*x+c)),x, algorithm="maxima")

[Out]

1/4*((2*d*x + 2*c + sin(2*d*x + 2*c))*B*sqrt(b) + 4*A*sqrt(b)*sin(d*x + c))/d

________________________________________________________________________________________

Fricas [A]  time = 1.66595, size = 570, normalized size = 5.82 \begin{align*} \left [\frac{B \sqrt{-b} \cos \left (d x + c\right ) \log \left (2 \, b \cos \left (d x + c\right )^{2} - 2 \, \sqrt{b \cos \left (d x + c\right )} \sqrt{-b} \sqrt{\cos \left (d x + c\right )} \sin \left (d x + c\right ) - b\right ) + 2 \,{\left (B \cos \left (d x + c\right ) + 2 \, A\right )} \sqrt{b \cos \left (d x + c\right )} \sqrt{\cos \left (d x + c\right )} \sin \left (d x + c\right )}{4 \, d \cos \left (d x + c\right )}, \frac{B \sqrt{b} \arctan \left (\frac{\sqrt{b \cos \left (d x + c\right )} \sin \left (d x + c\right )}{\sqrt{b} \cos \left (d x + c\right )^{\frac{3}{2}}}\right ) \cos \left (d x + c\right ) +{\left (B \cos \left (d x + c\right ) + 2 \, A\right )} \sqrt{b \cos \left (d x + c\right )} \sqrt{\cos \left (d x + c\right )} \sin \left (d x + c\right )}{2 \, d \cos \left (d x + c\right )}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^(1/2)*(b*cos(d*x+c))^(1/2)*(A+B*cos(d*x+c)),x, algorithm="fricas")

[Out]

[1/4*(B*sqrt(-b)*cos(d*x + c)*log(2*b*cos(d*x + c)^2 - 2*sqrt(b*cos(d*x + c))*sqrt(-b)*sqrt(cos(d*x + c))*sin(
d*x + c) - b) + 2*(B*cos(d*x + c) + 2*A)*sqrt(b*cos(d*x + c))*sqrt(cos(d*x + c))*sin(d*x + c))/(d*cos(d*x + c)
), 1/2*(B*sqrt(b)*arctan(sqrt(b*cos(d*x + c))*sin(d*x + c)/(sqrt(b)*cos(d*x + c)^(3/2)))*cos(d*x + c) + (B*cos
(d*x + c) + 2*A)*sqrt(b*cos(d*x + c))*sqrt(cos(d*x + c))*sin(d*x + c))/(d*cos(d*x + c))]

________________________________________________________________________________________

Sympy [A]  time = 66.1476, size = 99, normalized size = 1.01 \begin{align*} \begin{cases} \frac{A \sqrt{b} \sin{\left (c + d x \right )}}{d} + \frac{B \sqrt{b} x \sin ^{2}{\left (c + d x \right )}}{2} + \frac{B \sqrt{b} x \cos ^{2}{\left (c + d x \right )}}{2} + \frac{B \sqrt{b} \sin{\left (c + d x \right )} \cos{\left (c + d x \right )}}{2 d} & \text{for}\: d \neq 0 \\x \sqrt{b \cos{\left (c \right )}} \left (A + B \cos{\left (c \right )}\right ) \sqrt{\cos{\left (c \right )}} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**(1/2)*(b*cos(d*x+c))**(1/2)*(A+B*cos(d*x+c)),x)

[Out]

Piecewise((A*sqrt(b)*sin(c + d*x)/d + B*sqrt(b)*x*sin(c + d*x)**2/2 + B*sqrt(b)*x*cos(c + d*x)**2/2 + B*sqrt(b
)*sin(c + d*x)*cos(c + d*x)/(2*d), Ne(d, 0)), (x*sqrt(b*cos(c))*(A + B*cos(c))*sqrt(cos(c)), True))

________________________________________________________________________________________

Giac [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: NotImplementedError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^(1/2)*(b*cos(d*x+c))^(1/2)*(A+B*cos(d*x+c)),x, algorithm="giac")

[Out]

Exception raised: NotImplementedError